package com.hx.service;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.hx.entity.InfoManage;
import com.hx.repository.InfoManageRep;

@Component  //组件
public class InfoManageService {
	@Autowired
	private InfoManageRep infoManageRep;

  
	
	public void save(InfoManage infoManage){
		infoManageRep.save(infoManage);
	}
	public List<InfoManage> getAll() {
		return (List<InfoManage>) infoManageRep.findAll();
	}
	
	public List<InfoManage> getOneDay(String d){     /*得到某一天的infomamage的数据*/
		return infoManageRep.getInfoByDay(d);
	}
	public List<String> getAllDate(){
		return infoManageRep.getDate();
	}
	
}
